package com.lovesher.payment.common.enums;

public enum SchedulePayTaskStatus {
	DONE(-1, "任务执行过了"),
	
	TASK_1000(1000, "支付订单结果查询等待执行"),
	TASK_1001(1001, "支付订单结果查询开始执行"),
	TASK_1002(1002, "支付订单正常回调，无需执行任务"),
	
	TASK_1(1,"任务执行成功");
	private int status;
	private String name;

	private SchedulePayTaskStatus(int status, String name) {
		this.status = status;
		this.name = name;
	}

	public int getValue() {
		return this.status;
	}

	public String getName() {
		return this.name;
	}

	public static SchedulePayTaskStatus valueOf(int status) {
		SchedulePayTaskStatus ret = null;
		for (SchedulePayTaskStatus stt : SchedulePayTaskStatus.values()) {
			if (stt.getValue() == status) {
				ret = stt;
				break;
			}
		}

		return ret;
	}
}
